GXCombineColor
You can use theGXCombineColor
function to combine two colors with a transfer mode to get a result color for testing, without actually drawing.
gxColor *GXCombineColor(gxColor *target, gxInk operand);
target
- A pointer to the target color, which represents the destination color for drawing. On return,
target
points to the result color.operand
- A reference to an ink object, which represents the source color and the transfer mode for drawing.
- function result
- A pointer to the result color.
DESCRIPTION
TheGXCombineColor
function lets you preview or predict the results of drawing without actually carrying out a drawing operation. The function applies the color and transfer mode of the ink object referenced in theoperand
parameter to the color specified in thetarget
parameter. It calculates the result of drawing, with the ink's color as the source color and the target color as the destination color.
GXCombineColor
modifies the target color to reflect the operation and also returns a pointer to the resulting color. Iftarget
oroperand
isnil
, the function posts an error and returnsnil
.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory ink_is_nil color_is_nil colorSpace_out_of_range (debugging version) invalid_transferMode_colorSpace (debugging version) Warnings colorSet_index_out_of_range SEE ALSO
Ink objects and transfer modes for drawing are described in the chapter "Ink Objects" in this book.